export const highLightCode = () => {
  const javaCode = () => {
    return `Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("http://localhost:3000/api/auth/check")
.header("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
.header("Content-Type", "application/json")
.header("Accept", "*/*")
.header("Host", "localhost:3000")
.header("Connection", "keep-alive")
.body("{\\r\\n    \\"domain\\": \\"example.com\\",\\r\\n    \\"ip\\": \\"12.12.12.12\\"\\r\\n}")
.asString();`
  }

  const javaScriptCode = () => {
    return `var myHeaders = new Headers();
myHeaders.append("User-Agent", "Apifox/1.0.0 (https://apifox.com)");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Accept", "*/*");
myHeaders.append("Host", "localhost:3000");
myHeaders.append("Connection", "keep-alive");

var raw = JSON.stringify({
    "domain": "example.com",
    "ip": "12.12.12.12"
});

var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: raw,
    redirect: 'follow'
};

fetch("http://localhost:3000/api/auth/check", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));`
  }
  const phpCode = () => {
    return `$curl = curl_init();

curl_setopt_array($curl, array(
   CURLOPT_URL => 'http://localhost:3000/api/auth/check',
   CURLOPT_RETURNTRANSFER => true,
   CURLOPT_ENCODING => '',
   CURLOPT_MAXREDIRS => 10,
   CURLOPT_TIMEOUT => 0,
   CURLOPT_FOLLOWLOCATION => true,
   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
   CURLOPT_CUSTOMREQUEST => 'POST',
   CURLOPT_POSTFIELDS =>'{
    "domain": "example.com",
    "ip": "12.12.12.12"
}',
   CURLOPT_HTTPHEADER => array(
      'User-Agent: Apifox/1.0.0 (https://apifox.com)',
      'Content-Type: application/json',
      'Accept: */*',
      'Host: localhost:3000',
      'Connection: keep-alive'
   ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;`
  }
  return {
    javaCode,
    javaScriptCode,
    phpCode
  }
}
